import request from '@/utils/request'

// 查询教材列表
export function listMakeBook(query) {
  return request({
    url: '/teach/book/make',
    method: 'get',
    params: query
  })
}


// 查询教材列表
export function listMyBook(query) {
  return request({
    url: '/teach/book/my',
    method: 'get',
    params: query
  })
}

// 查询教材列表
export function listBook(query) {
  return request({
    url: '/teach/book/list',
    method: 'get',
    params: query
  })
}

// 查询教材详细
export function getBook(id) {
  return request({
    url: '/teach/book/' + id,
    method: 'get'
  })
}

// 新增教材
export function addBook(data) {
  return request({
    url: '/teach/book',
    method: 'post',
    data: data
  })
}

// 修改教材
export function updateBook(data) {
  return request({
    url: '/teach/book',
    method: 'put',
    data: data
  })
}

// 删除教材
export function delBook(id) {
  return request({
    url: '/teach/book/' + id,
    method: 'delete'
  })
}

// 导出教材
export function exportBook(query) {
  return request({
    url: '/teach/book/export',
    method: 'get',
    params: query
  })
}